// pages/perCenter/shipAddW/shipAddW.js
var util = require('../../../utils/util.js');
var dateUtil = require('../../../utils/data.js');
var api = require('../../../config/api.js');
var user = require('../../../services/user.js');
var app = getApp();
Page({
  data: {
    id: '',
    accountNumber: '',
    disabled: true
  },

  onLoad: function (options) {
    // 页面初始化 options为页面跳转所带来的参数

  },
  onReady: function () {
    // 页面渲染完成
  },
  onShow: function () {
    // 页面显示
  },
  onHide: function () {
    // 页面隐藏
  },
  onUnload: function () {
    // 页面关闭
  },
  setBankName: function (e) {   //获取input输入的值
    var that = this;
    that.setData({
      bankName: e.detail.value
    })
  },
  changeText:function(e){
    var that = this;
    if (e.detail.value != null&&e.detail.value.length>=12) {
      that.setData({
        disabled: false
      })
    } else {
      that.setData({
        disabled: true
      })
    }
  },
  setAccountNumber: function (e) {   //获取input输入的值

    var that = this;
    that.setData({
      accountNumber: e.detail.value
    })
   },

  save: function () {
    var that = this
    if (that.data.accountNumber == "") {
      wx.showToast({
        title: '银行卡号为空',
        icon: 'none'
      })
      return
    }
    wx.navigateTo({
      url: '/pages/perCenter/bankAdd/index?accountNumber=' + this.data.accountNumber,
    })
  }
})



